<template>
    <div>
       <input type="text" placeholder="请输入关键字" v-model="key_name"><br>
       <button @click="getInfo">获取信息</button>
    </div>
   </template>
   
   <script setup>
   import { ref, reactive, onMounted} from 'vue'
   import axios from 'axios';
   
   let key_name = ref('')
   let key = ref('acec679256ac3766367ab4a46d929a8f')
   function getInfo(){
       axios({
           method: 'post',
           url:`https://restapi.amap.com/v5/place/text?keywords=${key_name.value}&key=${key.value}&city_limit=False`
       }).then(res=>{
           console.log(res.data)
       }
       ).catch(err=>{
           console.log(err)
       })
   }
   </script>
   <style scoped>
   </style>
   